/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package data;

import com.jme3.math.Vector3f;
import computing.Configurator;

/**
 *
 * @author oxplay
 */
public class Vector3i {
    public int x,y,z;
    public Vector3i(int x, int y, int z){
        this.x = x;
        this.y = y;
        this.z = z;
    }
    public Vector3i(Vector3f vect){
        this.x = Configurator.getFloatToIntValue(vect.x);
        this.y = Configurator.getFloatToIntValue(vect.y);
        this.z = Configurator.getFloatToIntValue(vect.z);
    }
    public Vector3f getVector3f(){
        float fx = Configurator.getIntToFloatValue(x);
        float fy = Configurator.getIntToFloatValue(y);
        float fz = Configurator.getIntToFloatValue(z);
        return new Vector3f(fx, fy, fz);
    }

    @Override
    public String toString() {
        return "Vector3i{" + "x=" + x + ", y=" + y + ", z=" + z + '}';
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Vector3i other = (Vector3i) obj;
        if (this.x != other.x) {
            return false;
        }
        if (this.y != other.y) {
            return false;
        }
        if (this.z != other.z) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 37 * hash + this.x;
        hash = 37 * hash + this.y;
        hash = 37 * hash + this.z;
        return hash;
    }
    
}
